var fs = require('fs');
var Path = require('path');

function walkDir (dirPath) {
	console.log(dirPath);
	fs.readdir(dirPath, function (err, entires) {
		for (var idx in entires) {
			var fullPath = Path.join(dirPath, entires[idx]);
			(function (fullPath) {
				fs.stat(fullPath, function (err, stats) {
					if (stats && stats.isFile()) {
						console.log(fullPath);
					} else if(stats && stats.isDirectory()) {
						walkDir(fullPath);
					}
				})
			})(fullPath);
		}
	});
}
walkDir('./html');